package com.gddb.xwj.mywiki.util;

import java.io.Serializable;

/**
 * 描述：请求上下文
 *
 * @author xwj
 * @create 2022-03-29 23:53
 */
public class RequestContext implements Serializable {

    private static final long serialVersionUID = 5905765933884653145L;

    private static ThreadLocal<String> remoteAddr = new ThreadLocal<>();

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public static String getRemoteAddr() {
        return remoteAddr.get();
    }

    public static void setRemoteAddr(String remoteAddr) {
        RequestContext.remoteAddr.set(remoteAddr);
    }
}
